# -*-coding:utf-8-*-
"""
@project: python-project
@Time: 2024-07-15 13:04
@Author: Loneliness_Burial
@File: numpy求最大值和最小值.py
@Motto: 深情不改必坠死海
@software: pycharm
@version: python 3.7
"""

import numpy as np

arr = np.random.randint(1, 50, (3, 4))
print("创建的数组为：\n", arr)
max_res = np.max(arr, axis=0)
print("这个数组纵轴最大值为:\n", max_res)
min_res = np.min(arr, axis=1)
print("这个数组横轴最小值为：\n", min_res)
